<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>{% block title %}{% endblock %}&middot;现代教育技术中心服务监控</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <style>
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
      .sidebar-nav {
        padding: 9px 0;
      }

      @media (max-width: 980px) {
        /* Enable use of floated navbar text */
        .navbar-text.pull-right {
          float: none;
          padding-left: 5px;
          padding-right: 5px;
        }
      }
    </style>
    <link href="/static/css/bootstrap-responsive.min.css" rel="stylesheet">
  
    {% block head %}
    
    {% endblock %}

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="/static/js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="/static/ico/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="/static/ico/favicon.png">
  </head>

  <body>

    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="/">教育技术中心服务监控平台&nbsp;&middot;&nbsp;ServerMonitor</a>
          <div class="nav-collapse collapse">
            <p class="navbar-text pull-right">
                <a href="/logout" class="btn btn-danger">注销</a>
            </p>
            <ul class="nav">
              {% block nav %}
              {% endblock %}
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span3">
                <div class="well sidebar-nav">
                    <ul class="nav nav-list">
                       <li><a href="/"><i class="icon-align-justify"></i>网站后台</a></li>
                      {% if current_page %}
                      <li class="active"><a href="#"><i class="icon-tag"></i>{{ current_page|e }}</a></li>
                      {% endif %}
                      {% set navigation_bar = [
                            ('', '', '监控控制台',''),
                            ('/control', 'control', '监控控制台','cog'),
                            ('', '', '服务器相关',''),
                            ('/server/list', 'server_list', '服务器列表','tasks'),
                            ('/server/add', 'server_add', '添加服务器','plus'),
                            ('', '', '网站相关',''),
                            ('/web/list','web_list','网站列表','globe'),
                            ('/web/add','web_add','添加网站','plus'),
                            ('','','机房',''),
                            ('/location/list','location_list','机房列表','home'),
                            ('/location/add','location_add','添加机房','plus'),
                            ('','','用户管理',''),
                            ('/user/list','user_list','管理用户','user'),
                            ('/user/add','user_add','添加管理员','plus-sign')
                        ] -%}
                        {% set active_page = active_page|default('admin_index') -%}
                        {% for href, id, caption, icon in navigation_bar %}
                          <li {% if id == active_page %}class="active"{% elif href=='' %}class="nav-header"{% endif %}>
                            {% if href !='' %}
                            <a href="{{ href|e }}"><i class="icon-{{ icon }}"></i>{{ caption|e }}</a>
                            {% else %}
                                {{ caption|e }}
                            {% endif %}
                          </li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
            <div class="span9">
                {% block content %}
                {% endblock %}
            </div>
        </div>
    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="/static/js/jquery-1.10.1.min.js"></script>
    <script src="/static/js/Chart.min.js"></script>
    <script src="/static/js/bootstrap-dropdown.js"></script>
    {% block foot %}
    
    {% endblock %}

  </body>
</html>
